﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Web;
using System.Configuration;


namespace cz.uhul.DSMLv2.Services
{




  /// <summary>
  /// Full security model resolves access to Ld based on detailed acl
  /// where each node must have its security descriptor.
  /// All operations in batchRequest are validated against access control type (modify, delete, add, read)
  /// when there is no match between token and descriptor, permission denied error is returned.
  /// </summary>
  public class LdFullSecurityModel : LdSecurityModel
  {




    public LdFullSecurityModel()
    {
      //throw new NotImplementedException();
    }



    /// <summary>
    /// get / set security descriptor Superior Path. Security descriptor RDN is GUID
    /// placed under given superpath
    /// </summary>
    [ConfigurationProperty("LdSecurityDescriptorSuperPath", DefaultValue = "", IsRequired = true, IsKey = false)]
    public string LdSecurityDescriptorSuperPath
    {
      get { return (string)this["LdSecurityDescriptorSuperPath"]; }
      set { this["LdSecurityDescriptorSuperPath"] = value; }
    }






    /// <summary>
    /// get / set security descriptor objectClass
    /// </summary>
    [ConfigurationProperty("LdSecurityDescriptorObjectClass", DefaultValue = "", IsRequired = true, IsKey = false)]
    public string LdSecurityDescriptorObjectClass
    {
      get { return (string)this["LdSecurityDescriptorObjectClass"]; }
      set { this["LdSecurityDescriptorObjectClass"] = value; }
    }





    /// <summary>
    /// get / set access control list attribute name
    /// </summary>
    [ConfigurationProperty("LdAclAttribute", DefaultValue = "", IsRequired = true, IsKey = false)]
    public string LdAclAttribute
    {
      get { return (string)this["LdAclAttribute"]; }
      set { this["LdAclAttribute"] = value; }
    }




    ///// <summary>
    ///// get / set security token objectClass
    ///// </summary>
    //[ConfigurationProperty("LdSecurityTokenObjectClass", DefaultValue = "", IsRequired = true, IsKey = false)]
    //public string LdSecurityTokenObjectClass
    //{
    //  get { return (string)this["LdSecurityTokenObjectClass"]; }
    //  set { this["LdSecurityTokenObjectClass"] = value; }
    //}



  }

}